import request from '@/utils/request'

export function getAllNewparts(pageNum) {
  return request({
    url: '/NewpartsManage/deviceinfo',
    method: 'GET',
    params: { pageNum }
  })
}

export function select(partName) {
  return request({
    url: '/NewpartsManage/selectPartName',
    method: 'GET',
    params: { partName }
  })
}

export function add(data) {
  return request({
    url: '/NewpartsManage/add',
    method: 'POST',
    data
  })
}

export function deleteDevice(data) {
  return request({
    url: '/NewpartsManage/delete',
    method: 'GET',
    data
  })
}

export function update(data) {
  return request({
    url: '/NewpartsManage/update',
    method: 'POST',
    data
  })
}
